/**
 * 项目名：admin
 * 包名：com.xuebang.admin.mapper
 * 文件名：suggestionMapper.java
 * 版本信息：@version 1.0
 * 日期：2016-2-29-上午1720:55
 */
package com.xuebang.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.xuebang.admin.entity.Suggestion;

public interface SuggestionMapper extends BaseMapper<Suggestion> {

	/**
	 * 加载指定id的
	 */
	@Select("select * from suggestion where id=#{intid}")
	public Suggestion loadsuggestion(int intid);


	/**
	 * 加载
	 */
	@Select("select * from suggestion order by create_date DESC")
	public List<Suggestion> loadSuggestions();


	/**
	 * 通过电话查找
	 * 
	 * @param
	 */
	@Select("select * from suggestion where phone = #{phone}")
	public List<Suggestion> searchBySuggestion(String phone);


	/**
	 * 更新栏目
	 */
	@Update("update suggestion set sign=#{sign},contents=#{contents} ,answer=#{answer} where id=#{id}")
	public void updatesuggestion(Suggestion suggestion);
	
	/**
	 * 删除栏目
	 * 
	 * @param 
	 * 		strsuggestionIDs
	 */
	public void deletesuggestions(@Param("strsuggestionIDs")String[] strsuggestionIDs);
	
}